#!/bin/sh

message_server_error_limit() {
	echo ' > With its 6.x release `pacman` now supports a server error limit,'
	echo ' > which breaks `pacredir`. But `pacman` 7.x will fix that with support'
	echo ' > for cache servers. Install `pacman` with that features backported'
	echo ' > from this repository:'
	echo ' >   [pacredir]'
	echo ' >   Server = https://pkgbuild.com/~eworm/$repo/$arch/'
}

post_install() {
	echo ' > For instructions visit: https://github.com/eworm-de/pacredir#usage'
	message_server_error_limit
}

post_upgrade() {
	# return if old package version greater 0.4.7-0...
	(( $(vercmp $2 '0.4.7-0') > 0 )) && return

	message_server_error_limit
}
